app.controller('LoginCtrl', function ($scope, LoginService, $location) {
		var loginData = LoginService.loginModel();
		$scope.loginData = loginData;

		$scope.login = function(){
			if(loginData && loginData.username && loginData.password){
				LoginService.login(function(data){
					if(data.code == 200){
						$location.path('/tab/account');
					}else{
						alert(data.msg);
					}
				});
			}else{
				alert('用户名或密码不能为空');
			}
       };
});